<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="always" name="referrer">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>添加客户</title>
    <link rel="stylesheet" href="/LianniuWeb/css/seller/reset.css">
    <link rel="stylesheet" href="/LianniuWeb/css/seller/register.css">
    <link rel="stylesheet" href="/LianniuWeb/css/new/build/css/layui.css"  media="all">
    <link rel="stylesheet" href="/LianniuWeb/css/seller/webuploader.css" />
    <link type="text/css" rel="stylesheet" href="/LianniuWeb/css/easydialog.css"/>
    <script type="text/javascript" src="/LianniuWeb/js/widget/easydialog.min.js"></script>
</head>
<body>
<div class="ranking_header">
    <div class="back_btn"onclick="history.back(-1)"></div>
    <p>添加客户</p>
</div>
<form class="layui-form">
    <div class="padding_both">
        <div class="password_box">
            <span>供应商名：</span>
            <input type="text" id="supplyName" name="supplyname" placeholder="请输入供应商名"  value="">
        </div>
        <div class="password_box">
            <span>密码：</span>
            <input type="password" id="password" name="loginPassWord" placeholder="请输入密码" value="">
        </div>
        <div class="password_box">
            <span>联系方式：</span>
            <input type="text" id="mobile" name="mobile" placeholder="请输入联系方式" value="" maxlength="11">
        </div>
        <div class="password_box">
            <span>微信号：</span>
            <input type="text" id="weixin" name="weixin" placeholder="请输入微信号" value="">
        </div>
        <div class="password_box">
            <span>公司名称：</span>
            <input type="text" id="compname" name="compname" placeholder="请输入公司名称" value="">
        </div>
        <div class="select_box select_other3">
            <span>货源地：</span>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <select id="consProvince1" lay-filter="consProvince">
                        <option value="">请选择省</option>
                    </select>
                    <input type="hidden" id="consProvince" name="province" value="">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <select id="consCity1" lay-filter="consCity">
                        <option value="">请选择市</option>
                    </select>
                    <input type="hidden" id="consCity" name="city" value="">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <select id="consCounty1" lay-filter="consCounty">
                        <option value="">请选择县</option>
                    </select>
                    <input type="hidden" id="consCounty" name="county" value="">
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="password_box">
            <span>详细地址：</span>
            <input type="text" id="addr" name="address" placeholder="请输入您的具体地址" value="">
        </div>
        <div class="select_box">
            <span>规模：</span>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <select id="scale1" lay-filter="scale">
                        <option value="">请选择规模</option>
                    </select>
                    <input type="hidden" id="scale" name="scale" value="">
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="select_box">
            <span>平均单产：</span>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <select id="avgYield1" lay-filter="avgYield">
                        <option value="">请选择平均单产</option>
                    </select>
                    <input type="hidden" id="avgYield" name="avgyield" value="">
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="checkbox_box">
            <div class="top_sel">
                <div class="l_box">
                    <input type="checkbox" id="isPedigree1" value="1" lay-skin="primary" title="谱系有无：" lay-filter="isPedigreeFilter">
                    <input type="hidden" id="isPedigree" name="ispedigree" value="0" />
                </div>
                <div class="r_box" id="yearBox" style="display: none">
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <select id="pedigreeYear1" lay-filter="pedigreeYear">
                                <option value="">请选择谱系年份</option>
                            </select>
                            <input type="hidden" id="pedigreeYear" name="pedigreeyear" value="">
                        </div>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="add_photo" id="photoBox" style="display: none;">
                <span>谱系照片：</span>
                <div class="photo_box">
                    <div id="fileList" class="uploader-list"></div>
                    <div id="filePicker"></div>
                </div>
                <input id="pedigreeImg" type="hidden" name="pedigreeimg" value="">
                <div class="clear"></div>
            </div>
            <div class="top_sel">
                <div class="l_box">
                    <input type="checkbox" name="isRegister" id="isRegister1" lay-skin="primary" title="是否注册牛" value="1" lay-filter="isRegister">
                    <input type="hidden" id="isRegister" name="isregister" value="0">
                </div>
                <div class="l_box">
                    <input type="checkbox" id="isVoice1" lay-skin="primary" title="是否开发票" value="1" lay-filter="isVoice">
                    <input type="hidden" id="isVoice" name="isvoice" value="0">
                </div>
                <div class="clear"></div>
            </div>
        </div>
        <div class="password_box">
            <span>银行卡号：</span>
            <input type="text" id="bankCard" name="bankcard" placeholder="请输入" value="">
        </div>
        <div class="password_box">
            <span>开户行：</span>
            <input type="text" id="bank" name="bank" placeholder="请输入" value="">
        </div>
        <div class="password_box">
            <span>开户名：</span>
            <input type="text" id="bankname" name="bankname" placeholder="请输入" value="">
        </div>
        <div class="password_box">
            <span>文字说明：</span>
            <input type="text" id="remark" name="remark" placeholder="请输入" value="">
        </div>
        <input type="button" value="立即添加" class="load_btn" id="btn">
    </div>
</form>
<script type="text/javascript" src="/LianniuWeb/js/buyer/flexible.js"></script>
<script src="/LianniuWeb/css/new/build/layui.js" charset="utf-8"></script>
<script src="/LianniuWeb/js/jquery/jquery-1.11.3.min.js"></script>
<script src="/LianniuWeb/js/buyer/webuploader.js"></script>
<script src="/LianniuWeb/js/commons/phoneCode.js"></script>
<script src="/LianniuWeb/js/commons/commons.js"></script>
<script src="/LianniuWeb/js/staff/addClient.js"></script>
<script type="text/javascript">

    // 初始化Web Uploader
    var uploader = WebUploader.create({

        // 选完文件后，是否自动上传。
        auto: true,
        // swf文件路径
        swf: '/js/Uploader.swf',

        // 文件接收服务端。
        server: '/LianniuWeb/rest/fileUpload/uploadPic.do?filepath=clients',

        // 选择文件的按钮。可选。
        // 内部根据当前运行是创建，可能是input元素，也可能是flash.
        pick: {id:'#filePicker',multiple:false},
        compress:{
            width: 500,
            height: 550,

            // 图片质量，只有type为`image/jpeg`的时候才有效。
            quality: 40,

            // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.
            allowMagnify: false,

            // 是否允许裁剪。
            crop: false,

            // 如果发现压缩后文件大小比原来还大，则使用原来图片
            // 此属性可能会影响图片自动纠正功能
            noCompressIfLarger: false,

            // 单位字节，如果图片大小小于此值，不会采用压缩。
            compressSize: 30 * 1024
        },
        // 只允许选择图片文件。
        accept: {
            title: 'Images',
            extensions: 'gif,jpg,jpeg,bmp,png',
            mimeTypes: 'image/*'
        }
    });
    uploader.on( 'uploadSuccess', function( file,a,b ) {
        $("#fileList").append('<div id="WU_FILE_0" class="file-item thumbnail"><img src="'+ a.data+'"></div>')
        $("#pedigreeImg").val(a.data);
        $("#filePicker").hide();
        doubleClick("WU_FILE_0",function(obj){
            $(obj).remove()
            $("#filePicker").show();
            $("#pedigreeImg").val("");
        })
    });

    uploader.on( 'uploadError', function( file ) {
        easyAlert("上传出错");
    });
</script>
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?867c800f411683d2a7fa9eb1eabd9736";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
</body>
</html>